package com.jzo2o.customer.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * 安全配置类，负责安全相关Bean的定义与配置
 */
@Configuration
public class SecurityConfig {

    /**
     * 注册密码编码器Bean，采用BCrypt加密算法
     * @return 基于BCrypt的PasswordEncoder实例
     */
    @Bean
    public PasswordEncoder passwordEncoder(){
        return new BCryptPasswordEncoder();
    }

}
